import QtQuick
import QtQuick.Controls
import QtQuick.Shapes
import QtQml

Rectangle {
    id: root
    width: 30
    height: 30
    property color lightColor: "orange"
    color: "white"
    clip: true
    radius: width / 2
    Circle {
        anchors.fill: parent
        id: c3
        //径向渐变
        fillGradient: RadialGradient {
            //中心点
            centerX: root.width / 2; centerY: root.height / 2; centerRadius: root.width / 2
            //焦点
            focalX: root.width / 2; focalY: root.height / 2; focalRadius: 0
            GradientStop {
                position: 0.0; color: Qt.rgba(lightColor.r, lightColor.g, lightColor.b, 0.5)
            }
            GradientStop {
                position: 0.5; color: Qt.rgba(lightColor.r, lightColor.g, lightColor.b, 0.7)
            }
            GradientStop {
                position: 1.0; color: lightColor
            }
        }
    }

}
